import { createStackNavigator, createSwitchNavigator } from "react-navigation";

// import TopBar from "../components/TopBar";

import DemoNavigator from "./demoRouter";
import HomeRouter from "./homeRouter";
// import MineRouter from "./mineRouter";
import WelcomePage from "../pages/welcome";
// import WelcomePage from "../pages/login/login/main";
// import InfomationRouter from "./infomationRouter";

const WelcomeNavigator = createStackNavigator(
  {
    WelcomePage: {
      screen: WelcomePage,
      navigationOptions: {
        headerBackTitle: null,
      },
    },
  },
  {
    initialRouteName: "WelcomePage",
    headerTransitionPreset: "uikit",
    headerLayoutPreset: "center",
    headerMode: "none",
    defaultNavigationOptions: {
      gesturesEnabled: false,
    },
  }
);

const ContainerNavigator = createSwitchNavigator(
  {
    Main: {
      screen: HomeRouter,
    },
    Welcome: {
      screen: WelcomeNavigator,
    },
    Demo: {
      screen: DemoNavigator,
    },
  },
  {
    initialRouteName: "Welcome",
    // initialRouteName: "Demo",
    headerMode: "none",
    defaultNavigationOptions: {
      gesturesEnabled: false,
    },
  }
);

export default ContainerNavigator;
